<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
    <%@include file="/common/common.jspf" %>
    <script type="text/javascript">
        var tab = null;
        var accordion = null;
        var tree = null;
        var tabItems = [];
        $(document).ready(function () {
            $("[to-url]").each(function () {
                $(this).bind("click", function () {
                    var nav = $(this).attr("nav-n");
                    var sn = nav.split(",");
                    tab.addTabItem({
                        tabid: sn[1],
                        text: sn[0],
                        url: rootPath + $(this).attr("to-url")
                    });
                });
            });
            //布局
            $("#layout1").ligerLayout({height: '100%', space: 4, onHeightChanged: f_heightChanged});

            var height = $(".l-layout-center").height();

            $("#sidebar").height(height);
            //Tab
            tab = $("#framecenter").ligerTab({
                height: height
            });
            var lf = $('#submenu');
            if (lf.length != 0) {
                var submenu = lf.eq(0).find('li').eq(0).find('ul');
                if (submenu.length != 0) {
                    submenu.find('li').filter(':first').children('a')
                        .click();
                } else {
                    lf.eq(0).find('li').removeClass('active').filter(':first')
                        .addClass('active').children('a')
                        .click();

                }
            }
        });
        function f_heightChanged(options) {
            if (tab)
                tab.addHeight(options.diff);
            if (accordion && options.middleHeight - 24 > 0)
                accordion.setHeight(options.middleHeight - 24);
        }
        function f_addTab(tabid, text, url) {
            tab.addTabItem({
                tabid: tabid,
                text: text,
                url: url
            });
        }
    </script>
</head>

<body class="no-skin" style="background: white;">
<!-- #section:basics/navbar.layout -->
<div id="navbar" class="navbar navbar-default">

    <div class="navbar-container" id="navbar-container">
        <!-- #section:basics/sidebar.mobile.toggle -->
        <button type="button" class="navbar-toggle menu-toggler pull-left"
                id="menu-toggler" data-target="#sidebar">
            <span class="sr-only">Toggle sidebar</span> <span class="icon-bar"></span>

            <span class="icon-bar"></span> <span class="icon-bar"></span>
        </button>

        <!-- /section:basics/sidebar.mobile.toggle -->
        <div class="navbar-header pull-left">
            <!-- #section:basics/navbar.layout.brand -->
            <a href="#" class="navbar-brand">
                <small><i
                        class="fa fa-leaf"></i> 驾培后台管理系统
                </small>
            </a>
        </div>
        <div role="navigation" class="navbar-buttons navbar-header pull-right">
            <a href="${ctx}/logout.shtml" class="navbar-brand">
                <small>退出系统
                </small>
            </a>
        </div>
    </div>

</div>

<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">

    <!-- #section:basics/sidebar -->
    <div id="sidebar" class="sidebar responsive">
        <div id="sidebar-shortcuts" class="sidebar-shortcuts">
            <div id="sidebar-shortcuts-large" class="sidebar-shortcuts-large">
                <button class="btn btn-success" style="padding: 10px 12px">
                    <i class="ace-icon fa fa-signal"></i>
                </button>

                <button class="btn btn-info" style="padding: 10px 12px">
                    <i class="ace-icon fa fa-pencil"></i>
                </button>

                <!-- #section:basics/sidebar.layout.shortcuts -->
                <button class="btn btn-warning" style="padding: 10px 12px">
                    <i class="ace-icon fa fa-users"></i>
                </button>

                <button class="btn btn-danger" style="padding: 10px 12px">
                    <i class="ace-icon fa fa-cogs"></i>
                </button>

                <!-- /section:basics/sidebar.layout.shortcuts -->
            </div>

            <div id="sidebar-shortcuts-mini" class="sidebar-shortcuts-mini">
                <span class="btn btn-success"></span>

                <span class="btn btn-info"></span>

                <span class="btn btn-warning"></span>

                <span class="btn btn-danger"></span>
            </div>
        </div>
        <ul class="nav nav-list">
            <li><a href="javascript:;" to-url="/school/listUI.shtml?id=64" nav-n="驾校管理,school_list"
                   class="dropdown-toggle"><i class="menu-icon fa fa-cog"></i><span class="menu-text"> 驾校管理 </span>
            </a>
            </li>
            <li><a href="javascript:;" to-url="/resident/listUI.shtml?id=64" nav-n="学员管理,resident_list"
                   class="dropdown-toggle"><i class="menu-icon fa fa-user"></i><span class="menu-text"> 学员管理 </span>
            </a>
            </li>
            <li><a href="javascript:;" to-url="/resident/listUI2.shtml?id=65" nav-n="教练管理,resident_list2"
                   class="dropdown-toggle"><i class="menu-icon fa fa-user-md"></i><span class="menu-text"> 教练管理 </span>
            </a>
            </li>
        </ul>
        <!-- /.nav-list -->

        <!-- #section:basics/sidebar.layout.minimize -->
        <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
            <i class="ace-icon fa fa-angle-double-left"
               data-icon1="ace-icon fa fa-angle-double-left"
               data-icon2="ace-icon fa fa-angle-double-right"></i>
        </div>

        <!-- /section:basics/sidebar.layout.minimize -->
    </div>

    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div id="layout1" style="width:99.2%; margin:0 auto; margin-top:4px; ">
            <div position="center" id="framecenter">
                <!-- <div tabid="home" title="我的主页">
                </div>  -->
            </div>

        </div>
    </div>
    <!-- /.navbar-container -->
</div>
<!-- /.main-container -->
</body>
</html>